{% load static %}
<div class="card mt-3 {% if answer.correctness %}border-success{% endif %}">
    {% if answer.correctness %}
        <div class="card-header text-bg-success">Решение</div>
    {% endif %}
    <div class="card-body">
        <p class="card-text fs-5 mb-0">
            {{answer.content}}
        </p>
        {% include 'cards\cardinfo.html' with object=answer only %}
        {% if answer.correctness %}
            <div class="d-none d-sm-block">
                <button type="button" class="btn btn-warning mt-2">Отменить решение</button>
            </div>
            <div class="d-block d-sm-none">
                <button type="button" class="btn btn-warning mt-2">Отменить</button>
            </div>
        {% else %}
            <div class="d-none d-sm-block">
                <button type="button" class="btn btn-success mt-2">Отметить как решение</button>
            </div>
            <div class="d-block d-sm-none">
                <button type="button" class="btn btn-success mt-2">Решение</button>
            </div>
        {% endif %}
    </div>
</div>